package com.bootdo.staff.dao;

import com.bootdo.staff.domain.StaffMenuRoleDO;
import com.bootdo.system.domain.RoleMenuDO;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;

/**
 * 用户权限表
 * @author chglee
 * @email 1992lcg@163.com
 * @date 2018-04-23 13:59:00
 */
@Mapper
public interface StaffMenuRoleDao {

	StaffMenuRoleDO get(Long id);
	
	List<StaffMenuRoleDO> list(Map<String,Object> map);
	
	int count(Map<String,Object> map);
	
	int save(StaffMenuRoleDO staffMenuRole);
	
	int update(StaffMenuRoleDO staffMenuRole);
	
	int remove(Long id);
	
	int batchRemove(Long[] ids);

	int batchSave(List<StaffMenuRoleDO> list);
	
	/**
	 * 获取用户是否有权访问该菜单
	 * @param map
	 * @return
	 */
	StaffMenuRoleDO getIsRole(Map<String,Object> map);
	/**
	 * 按照用户的id 和菜单权限 来修改工作状态
	 * @param staffMenuRoleDO
	 * @return
	 */
	int updateUserState(StaffMenuRoleDO staffMenuRoleDO);

	void removeByUserId(Long staffId);

	List<Long> listMenuIdByUserId(Long staffId);
	
}
